<?php


namespace App\Common\tools;


trait Instance
{
    protected static $myInstance = null;

    /**
     * @return static
     * @author 刘宏盟
     */
    public static function instance()
    {
        if (static::$myInstance != null)
            return static::$myInstance;
        static::$myInstance = new static();
        return static::$myInstance;
    }
}
